package com.buddy.syn.method._07;

/**
 * 同步不可以继承
 */
public class SynNotExtendsFatherService {

    synchronized public void method(){
        try {
            System.out.println("int Father 下一步 sleep begin ThreadName= "+Thread.currentThread().getName()
                    +" Time= "+System.currentTimeMillis());
            Thread.sleep(5000);
            System.out.println("int Father 下一步 sleep end ThreadName= "+Thread.currentThread().getName()
                    +" Time= "+System.currentTimeMillis());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

